"crates-io 0.10.0",
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.13 (registry+https://github.com/rust-lang/crates.io-index)",
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]
name = "docopt"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "hex"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "idna"
version = "0.1.2"
"checksum curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c90e1240ef340dd4027ade439e5c7c2064dd9dc652682117bd50d1486a3add7b"
"checksum curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "23e7e544dc5e1ba42c4a4a678bd47985e84b9c3f4d3404c29700622a029db9c3"
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
-"checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8"
+"checksum docopt 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63e408eee8a772c5c61f62353992e3ebf51ef5c832dd04d986b3dc7d48c5b440"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b"
"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4"
+"checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa"
"checksum idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2233d4940b1f19f0418c158509cd7396b8d70a5db5705ce410914dc8fa603b37"
"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
"checksum jobserver 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c43fc6e4066b2adf0539c854daa1d926d7f23e6926e019850d34b8ae46391b2e"
crates-io = { path = "src/crates-io", version = "0.10" }
crossbeam = "0.2"
curl = "0.4.6"
-docopt = "0.7"
+docopt = "0.8"
env_logger = "0.4"
error-chain = "0.10.0"
filetime = "0.1"
git2 = "0.6"
git2-curl = "0.7"
glob = "0.2"
+hex = "0.2"
jobserver = "0.1.4"
libc = "0.2"
libgit2-sys = "0.6"
log = "0.3"
num_cpus = "1.0"
-rustc-serialize = "0.3"
scoped-tls = "0.1"
semver = { version = "0.7.0", features = ["serde"] }
serde = "1.0"
use cargo::util::{CliResult, CliError, Config, CargoErrorKind};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_no_run: bool,
flag_package: Vec<String>,
use cargo::util::important_paths::{find_root_manifest_for_wd};
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_package: Vec<String>,
flag_jobs: Option<u32>,
extern crate url;
extern crate env_logger;
extern crate git2_curl;
-extern crate rustc_serialize;
extern crate toml;
#[macro_use]
extern crate log;
use cargo::util::{self, CliResult, lev_distance, Config, CargoResult, CargoError, CargoErrorKind};
use cargo::util::CliError;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Flags {
flag_list: bool,
flag_version: bool,
the --release flag will use the `release` profile instead.
";
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_package: Vec<String>,
flag_jobs: Option<u32>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_package: Vec<String>,
flag_target: Option<String>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_target: Option<String>,
flag_features: Vec<String>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::find_root_manifest_for_wd;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_manifest_path: Option<String>,
flag_verbose: u32,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::find_root_manifest_for_wd;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_manifest_path: Option<String>,
flag_verbose: u32,
use cargo::sources::git::{GitSource};
use cargo::util::{Config, CliResult, ToUrl};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_url: String,
flag_reference: String,
use cargo::util::{CliResult, CliError, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options;
pub const USAGE: &'static str = "
use cargo::ops;
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_verbose: u32,
flag_quiet: Option<bool>,
use cargo::core::{SourceId, GitReference};
use cargo::util::{CliResult, Config, ToUrl};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_jobs: Option<u32>,
flag_features: Vec<String>,
use cargo::util::{CliResult, CliError, Config};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct LocateProjectFlags {
flag_manifest_path: Option<String>,
}
use cargo::sources::RegistrySource;
use cargo::util::{CliResult, CargoResultExt, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_host: Option<String>,
arg_token: Option<String>,
use cargo::util::important_paths::find_root_manifest_for_wd;
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_color: Option<String>,
flag_features: Vec<String>,
use cargo::ops;
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_verbose: u32,
flag_quiet: Option<bool>,
use cargo::ops;
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
arg_crate: Option<String>,
flag_token: Option<String>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::find_root_manifest_for_wd;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_verbose: u32,
flag_quiet: Option<bool>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_verbose: u32,
flag_quiet: Option<bool>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::find_root_manifest_for_wd;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_host: Option<String>,
flag_token: Option<String>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_manifest_path: Option<String>,
flag_color: Option<String>,
use cargo::util::{CliResult, CliError, Config, CargoErrorKind};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_bin: Option<String>,
flag_example: Option<String>,
use cargo::util::important_paths::{find_root_manifest_for_wd};
use cargo::util::{CliResult, CliError, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
arg_opts: Option<Vec<String>>,
flag_package: Option<String>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::{find_root_manifest_for_wd};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
arg_opts: Vec<String>,
flag_target: Option<String>,
use std::cmp;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_host: Option<String>,
flag_verbose: u32,
use cargo::util::{CliResult, CliError, Config, CargoErrorKind};
use cargo::util::important_paths::find_root_manifest_for_wd;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
arg_args: Vec<String>,
flag_features: Vec<String>,
use cargo::ops;
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_bin: Vec<String>,
flag_root: Option<String>,
use cargo::util::{CliResult, Config};
use cargo::util::important_paths::find_root_manifest_for_wd;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
flag_package: Vec<String>,
flag_aggressive: bool,
use serde_json;
use toml;
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Flags {
flag_manifest_path: Option<String>,
flag_verbose: u32,
use cargo;
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
-pub struct Options;
+#[derive(Deserialize)]
+pub struct Options {}
pub const USAGE: &'static str = "
Show version information
use cargo::ops;
use cargo::util::{CliResult, Config};
-#[derive(RustcDecodable)]
+#[derive(Deserialize)]
pub struct Options {
arg_crate: Option<String>,
flag_token: Option<String>,
extern crate fs2;
extern crate git2;
extern crate glob;
+extern crate hex;
extern crate jobserver;
extern crate libc;
extern crate libgit2_sys;
extern crate num_cpus;
-extern crate rustc_serialize;
extern crate semver;
extern crate serde;
extern crate serde_ignored;
use std::error::Error;
use error_chain::ChainedError;
-use rustc_serialize::Decodable;
+use serde::Deserialize;
use serde::ser;
use docopt::Docopt;
}
}
-pub fn call_main_without_stdin<Flags: Decodable>(
+pub fn call_main_without_stdin<'de, Flags: Deserialize<'de>>(
exec: fn(Flags, &Config) -> CliResult,
config: &Config,
usage: &str,
.argv(args.iter().map(|s| &s[..]))
.help(true);
- let flags = docopt.decode().map_err(|e| {
+ let flags = docopt.deserialize().map_err(|e| {
let code = if e.fatal() {1} else {0};
CliError::new(e.to_string().into(), code)
})?;
Doctest,
}
-#[derive(Clone, Copy, PartialEq, Eq, RustcDecodable)]
+#[derive(Clone, Copy, PartialEq, Eq, Deserialize)]
pub enum MessageFormat {
Human,
Json
use std::path::Path;
use std::collections::BTreeMap;
-use rustc_serialize::{Decodable, Decoder};
+use serde::{Deserialize, Deserializer};
+use serde::de;
use git2::Config as GitConfig;
use git2::Repository as GitRepository;
bin: bool,
}
-impl Decodable for VersionControl {
- fn decode<D: Decoder>(d: &mut D) -> Result<VersionControl, D::Error> {
- Ok(match &d.read_str()?[..] {
+impl<'de> Deserialize<'de> for VersionControl {
+ fn deserialize<D: Deserializer<'de>>(d: D) -> Result<VersionControl, D::Error> {
+ Ok(match &String::deserialize(d)?[..] {
"git" => VersionControl::Git,
"hg" => VersionControl::Hg,
"pijul" => VersionControl::Pijul,
"none" => VersionControl::NoVcs,
n => {
- let err = format!("could not decode '{}' as version control", n);
- return Err(d.error(&err));
+ let value = de::Unexpected::Str(n);
+ let msg = "unsupported version control system";
+ return Err(de::Error::invalid_value(value, &msg));
}
})
}
use std::io::Read;
use std::path::{Path, PathBuf};
-use rustc_serialize::hex::ToHex;
+use hex::ToHex;
+
use serde_json;
use core::{Package, PackageId, Summary, SourceId, Source, Dependency, Registry};
use std::io::prelude::*;
use std::path::Path;
-use rustc_serialize::hex::ToHex;
-
use core::PackageId;
+use hex::ToHex;
use sources::registry::{RegistryData, RegistryConfig};
use util::FileLock;
use util::paths;
use curl::easy::{Easy, List};
use git2;
-use rustc_serialize::hex::ToHex;
+use hex::ToHex;
use serde_json;
use url::Url;
use core::MultiShell;
use core::shell::{Verbosity, ColorConfig};
use jobserver;
-use rustc_serialize::{Encodable,Encoder};
+use serde::{Serialize, Serializer};
use toml;
use util::Rustc;
use util::errors::{CargoResult, CargoResultExt, CargoError, internal};
}
}
-impl Encodable for ConfigValue {
- fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
+impl Serialize for ConfigValue {
+ fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
match *self {
- CV::String(ref string, _) => string.encode(s),
+ CV::String(ref string, _) => string.serialize(s),
CV::List(ref list, _) => {
let list: Vec<&String> = list.iter().map(|s| &s.0).collect();
- list.encode(s)
+ list.serialize(s)
}
- CV::Table(ref table, _) => table.encode(s),
- CV::Boolean(b, _) => b.encode(s),
- CV::Integer(i, _) => i.encode(s),
+ CV::Table(ref table, _) => table.serialize(s),
+ CV::Boolean(b, _) => b.serialize(s),
+ CV::Integer(i, _) => i.serialize(s),
}
}
}
#![allow(deprecated)]
+use hex::ToHex;
use std::hash::{Hasher, Hash, SipHasher};
-use rustc_serialize::hex::ToHex;
-
pub fn to_hex(num: u64) -> String {
[
(num >> 0) as u8,
flate2 = "0.2"
git2 = { version = "0.6", default-features = false }
hamcrest = "=0.1.1"
+hex = "0.2"
kernel32-sys = "0.2"
libc = "0.2"
log = "0.3"
-rustc-serialize = "0.3"
serde = "1.0"
serde_json = "1.0"
tar = { version = "0.4", default-features = false }
extern crate flate2;
extern crate git2;
extern crate hamcrest;
+extern crate hex;
extern crate libc;
-extern crate rustc_serialize;
extern crate serde;
#[macro_use]
extern crate serde_json;
use flate2::Compression::Default;
use flate2::write::GzEncoder;
use git2;
-use rustc_serialize::hex::ToHex;
+use hex::ToHex;
use tar::{Builder, Header};
use url::Url;
#[macro_use]
extern crate cargotest;
extern crate hamcrest;
-extern crate rustc_serialize;
+#[macro_use]
+extern crate serde_derive;
+extern crate serde_json;
use std::collections::HashMap;
use std::fs::{self, File};
use std::io::prelude::*;
use std::str;
-use rustc_serialize::json;
-
use cargotest::cargo_process;
use cargotest::support::{project, execs, ProjectBuilder};
use cargotest::support::paths;
cksum: Checksum,
}
-#[derive(RustcEncodable)]
+#[derive(Serialize)]
struct Checksum {
package: String,
files: HashMap<String, String>,
fn build(&mut self) {
let p = self.p.take().unwrap();
- let json = json::encode(&self.cksum).unwrap();
+ let json = serde_json::to_string(&self.cksum).unwrap();
let p = p.file(".cargo-checksum.json", &json);
p.build();
}
extern crate cargo;
extern crate cargotest;
extern crate hamcrest;
-extern crate rustc_serialize;
use cargotest::support::{project, execs};
use hamcrest::assert_that;